package com.qf.tenant.mapper;

import com.qf.pck.entity.Package;
import com.qf.tenant.entity.Tenant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 租户表 Mapper 接口
 * </p>
 *
 * @author wxh
 * @since 2023-10-28
 */
public interface TenantMapper extends BaseMapper<Tenant> {

    @Select("select p.* from package_order po\n" +
            "join package p on p.id = po.package_id\n" +
            "where po.tenant_id=#{tenantId}")
    public List<Package> findPermsById(String tenantId);


}
